//
//  LoginCiewController.swift
//  hunan_ios_ldnsm
//
//  Created by I-Q-I on 2019/4/28.
//  Copyright © 2019 I-Q-I. All rights reserved.
//

import UIKit
import IQKeyboardManagerSwift
class SelectRoleViewController: UBaseViewController {
    
    var state = 0
    var selectRoleModel = SelectRoleView()
    var selectRoleView = SelectRoleView()
    
    override func configNavigationBar() {
        super.configNavigationBar()
        navigationItem.title = "认证选择"
        navigationController?.navigationBar.isTranslucent = false
        let messageButton = UIButton()
        let spacer = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil,action: nil)
        spacer.width = 20
        messageButton.setTitle("跳过", for: .normal)
        messageButton.setTitleColor(UIColor.colBlack, for: .normal)
        messageButton.addTarget(self, action: #selector(jump), for: .touchUpInside)
        let navRightButton = UIBarButtonItem(customView: messageButton)
        if self.state == 1 {
            messageButton.isHidden = true
        }
        navigationItem.rightBarButtonItems = [spacer,navRightButton]
    }
    override func configUI() {
        
        selectRoleView = SelectRoleView(frame: CGRect(x: 0, y: 0, width: screenWidth, height: screenHeight))
        view.addSubview(selectRoleView)
        selectRoleView.proxyBtn.addTarget(self, action: #selector(selectProxy), for: .touchUpInside)
          selectRoleView.installBtn.addTarget(self, action: #selector(selectInstall), for: .touchUpInside)

        
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    @objc func selectProxy(){
//           self.navigationController?.pushViewController(ServerFlowInfoViewController(), animated: true)
    }
    @objc func selectInstall(){
    
//          self.navigationController?.pushViewController(ServerBaseInfoViewController(), animated: true)
    }
    @objc func jump(){
        self.present(UTabBarController(), animated: false, completion: {})
    }
    
    
}
